package org.biloxi.commands;

import org.biloxi.commands.changephase.ChangePhase;
import org.biloxi.commands.changephase.events.PhaseEvent;
import org.biloxi.commands.changeturn.ChangeTurn;
import org.biloxi.commands.draw.Draw;
import org.biloxi.commands.endgame.EndGame;
import org.biloxi.commands.movecard.MoveCard;
import org.biloxi.commands.playcard.PlayCard;
import org.biloxi.commands.playerlost.PlayerLost;
import org.biloxi.player.PlayerID;
import org.biloxi.player.actions.ActionOptionPair;
/**
 * Single source commands that can operate on the GameState.
 * 
 * @author Peter.WM.Wong@gmail.com
 */
public interface CommandRepository {

	/**
	 * @see ChangePhase
	 */
	public Command<ChangePhase.Options, ChangePhase.Result> changePhase();
	
	/**
	 * @see ChangePhase
	 */
	public ChangePhase.Result changePhase(ChangePhase.Options options);
	
	/**
	 * @see ChangeTurn
	 */
	public Command<ChangeTurn.Options, ChangeTurn.Result> changeTurn();
	
	/**
	 * @see ChangeTurn
	 */
	public ChangeTurn.Result changeTurn(ChangeTurn.Options options);
	
	/**
	 * Convenience event for listening to the beginning and end of the Combat Phase 
	 */
	public PhaseEvent  combatPhase();
	
	/**
	 * @see Draw
	 */
	public Command<Draw.Options, Draw.Result> draw();
	
	/**
	 * @see Draw
	 */
	public Draw.Result draw(Draw.Options options);
	
	/**
	 * Convenience event for listening to the beginning and end of the Draw Phase 
	 */
	public PhaseEvent  drawPhase();
	
	/**
	 * @see EndGame
	 */
	public Command<EndGame.Options, EndGame.Result> endGame();
	
	/**
	 * @see EndGame
	 */
	public EndGame.Result endGame(EndGame.Options options);
	
	/**
	 * Convenience event for listening to the beginning and end of the Main1 Phase 
	 */
	public PhaseEvent  main1Phase();
	
	/**
	 * Convenience event for listening to the beginning and end of the Main2 Phase 
	 */
	public PhaseEvent  main2Phase();
	
	/**
	 * @see MoveCard
	 */
	public Command<MoveCard.Options, MoveCard.Result> moveCard();
	
	/**
	 * @see MoveCard
	 */
	public MoveCard.Result moveCard(MoveCard.Options options);
	
	/**
	 * @see PlayCard
	 */
	public Command<PlayCard.Options, PlayCard.Result> playCard();
	
	
	/**
	 * @see PlayCard
	 */
	public PlayCard.Result playCard(PlayCard.Options options);

	/**
	 * @see PlayerLost
	 */
	public Command<PlayerLost.Options, PlayerLost.Result> playerLost();

	/**
	 * @see PlayerLost
	 */
	public PlayerLost.Result playerLost(PlayerLost.Options options);

	/**
	 * Requests a Player's action.
	 */
	public ActionOptionPair<?>[] requestPlayerActions(PlayerID p);

	/**
	 * Convenience event for listening to the beginning and end of the UnTap Phase 
	 */
	public PhaseEvent  unTapPhase();

	/**
	 * Convenience event for listening to the beginning and end of the UpKeep Phase 
	 */
	public PhaseEvent  upKeepPhase();
}
